<?php
require_once('relatedfiles_model.php');

class RelatedImages_model extends RelatedFiles_model{
	function RelatedImages_model(){
		parent::RelatedFiles_model();
		$this->ci =& get_instance();
		$this->ci->load->model('Images_model');
		$this->setRelationalFields('project_id', 'image_id');
		$this->setManyModel($this->ci->Images_model);
		$this->setFileLocationField('image_path');
		
		/* setting the select field when the model is invoked so
		 * we can get rid of relatedimage_model. 
		 */
		//$this->setSelectField('image_selected');
		//$this->setOptionField('image_path');
	}
}
?>